<?php

/**
 * SmsNews class
 *
 * @author Julot
 * @since Thursday, June 9, 2011. 03:58 PM
 */
class SmsNews extends News {

	public $type = News::TYPE_SMS;

	static function model($className=__CLASS__) {
		return parent::model($className);
	}

	function defaultScope() {
		return array(
			'condition'=>"type='" . News::TYPE_SMS . "'",
		);
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules() {
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('contact, value', 'required'),
		);
	}
}
